package com.yoomiito.app.ui.college.detail

import android.os.Bundle
import android.view.View
import com.yoomiito.app.R
import com.yoomiito.app.base.App
import com.yoomiito.app.base.BaseLazyFragment
import com.yoomiito.app.utils.L
import kotlinx.android.synthetic.main.fm_rcy.*

//import kotlinx.android.synthetic.main.layout_rcy.*

/**
 * kotlinx不可以找到相应的资源 所以暂时废弃 使用SubjectTableFragment2
 */
class SubjectTableFragment : BaseLazyFragment<SubjectTablePresenter>(){
    private lateinit var mAdapter:SubjectTableAdapter
    private lateinit var rcy: androidx.recyclerview.widget.RecyclerView
    override fun getLayoutId(): Int = R.layout.fm_rcy

    override fun newP(): SubjectTablePresenter = SubjectTablePresenter(App.mAppConfig)

    override fun initData_kotlin(view: View?, savedInstanceState: Bundle?) {
        L.i("View: $fm_rcy")
        initRcy(view)
    }

    private fun initRcy(view: View?) {
//        rcy = rootView?.findViewById(R.id.layout_rcy)!!
//        rcy.setBackgroundResource(R.color.color_gray_F8F8F8)
//        rcy.layoutManager = LinearLayoutManager(context)
//        rcy.addItemDecoration(SpacingDecoration(0, DensityUtil.dp2px(10f), true))
//        mAdapter = SubjectTableAdapter(null)
//        rcy.adapter = mAdapter
    }
}